]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
lookingGlass: Handle undefined in objectToString()
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 19 Feb 2020 00:43:23 +0000 (01:43 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 19 Feb 2020 10:17:17 +0000 (11:17 +0100)
Fallout from commit 9d941f8202: Template strings handle undefined
values just fine, the replacement does not. Fix that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1020

js/ui/lookingGlass.js

index d101591efadd8fb9a681b1c908696b21c7e07937..54e3e48581e4c624e9ed889019be7315c7ce7723 100644 (file)
@@ -244,7 +244,7 @@ function objectToString(o) {
         // special case this since the default is way, way too verbose
         return '<js function>';
     } else {
-        return o.toString();
+        return o !== undefined ? o.toString() : 'undefined';
     }
 }